#FROM findepi/graalvm:java17-native
#FROM registry.cn-hangzhou.aliyuncs.com/uark/library:java8
FROM openjdk:8-jdk
MAINTAINER Lion Li

RUN mkdir -p /ruoyi/server/logs \
    /ruoyi/server/temp \
    /ruoyi/skywalking/agent

WORKDIR /ruoyi/server

ENV TIME_ZONE Asia/Shanghai

ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV SERVER_DEBUG_PORT=8081

EXPOSE ${SERVER_PORT}
EXPOSE ${SERVER_DEBUG_PORT}

ADD ./*.jar ./app.jar

ENTRYPOINT ["java", \
            "-Djava.security.egd=file:/dev/./urandom", \
#            "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8081", \
            "-Dserver.port=${SERVER_PORT}", \
            # 应用名称 如果想区分集群节点监控 改成不同的名称即可
#            "-Dskywalking.agent.service_name=ruoyi-server", \
#            "-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar", \
            "-jar", "app.jar" \
#            , "--spring.profiles.active=prod"
            ]